{extend name='admin@main'}

{block name="button"}
<button data-modal='{:url("add")}' data-title="添加" class='layui-btn layui-btn-sm layui-btn-primary'>添加</button>
{/block}

{block name="content"}
<div class="think-box-shadow">
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class="text-left">等级编号</th>
            <th class="text-left">等级名称</th>
            <th class="text-left">logo</th>
            <th class="text-left">需要业绩</th>
            <th class="text-left">需要下级会员</th>
            <th class="text-left">享受团队收益（%）</th>
            <th class="text-left"></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='text-left nowrap'>
                {$vo.id|default=''}
            </td>
            <td class='text-left nowrap'>
                {$vo.name|default=''}
            </td>
            <td class='text-left nowrap'>
                {notempty name='vo.logo'}
                <img data-tips-image style="width:60px;height:60px" src="{$vo.logo|default=''}" class="margin-right-5 text-top">
                {/notempty}
            </td>
            <td class='text-left nowrap'>
                {:number_format($vo.need_amount)}
            </td>
            <td class='text-left nowrap'>
                需要{$vo.need_mid_count|default='0'}个{$vo.meed_mname|default=''}会员
            </td>
            <td class='text-left nowrap'>
                {$vo.rewards_profit|default=''}
            </td>
            <td class='text-left nowrap'>
                {if auth("admin/member/edit")}
                    <a data-title="编辑" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {else}
                        <a data-tips-text="您没有编辑的权限哦！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">编 辑</a>
                    {/if}
                {if auth("admin/member/remove")}
                    <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                {else}
                    <a data-tips-text="您没有删除的权限哦！" class="layui-btn layui-btn-sm layui-btn-primary layui-disabled">删 除</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
